package com.canvasgames.texture;

import javax.microedition.khronos.opengles.GL10;

import com.android.dinamond.R;

import android.content.Context;

public class TestTextureManager extends TextureManager{
	
	public static final String MENU = "menu";
	public static final int MENU_1 = 0;
	public static final int MENU_2 = 1;
	public static final String INGAME = "ingame";
	public static final int INGAME_1 = 2;
	public boolean isLoaded = false;
	
	public TestTextureManager(Context context) {
		super(context);
	}

	public void loadAllResource(final GL10 gl) {
//		Thread thread = new Thread(){
//			public void run() {
				loadResources(MENU, R.drawable.robot, gl);
				loadResources(INGAME, R.drawable.cell, gl);
				loadAllTexture();
				isLoaded = true;
//			};
//		};
//		thread.start();
	}
	
	public void loadAllTexture() {
		Texture texture1 = new Texture(MENU_1, getTextureId(MENU), 10, 10, 50, 50);
		Texture texture2 = new Texture(MENU_2, getTextureId(MENU), 50, 50, 60, 60);
		Texture texture3 = new Texture(INGAME_1, getTextureId(INGAME), 0, 0, 16, 16);
		addTextures(texture1);
		addTextures(texture2);
		addTextures(texture3);
	}

}
